package com.unchartedskies.controller.command
{
	import com.gamesmile.framework.util.Log;
	import com.unchartedskies.controller.event.AccueilClickEvent;
	import com.unchartedskies.controller.event.CreditsClickEvent;
	import com.unchartedskies.controller.event.LoginClickEvent;
	import com.unchartedskies.model.State;
	import com.unchartedskies.model.value.StateConstant;
	import com.unchartedskies.view.Accueil;
	import com.unchartedskies.view.Credits;
	import com.unchartedskies.view.Login;
	
	import org.robotlegs.mvcs.Command;
	
	public class CreditsCommand extends Command
	{
		[Inject]
		public var creditsClickEvent:CreditsClickEvent;
		
		[Inject]
		public var state:State;
		
		override public function execute():void
		{
			Log.debug(this,"Execute CreditsClickCommand");
			Log.debug(this,"Target name  "+creditsClickEvent.targetName);
			
			switch(creditsClickEvent.targetName)
			{
				case Credits.BT_RETURN:
				{
					state.currentState = StateConstant.STATE_ACCUEIL;
				break;
				}
				default:
				{
				break;
				}
			}
		}
	}
}